using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using Slf.BitFactoryFacade;

namespace Slf.Samples.BitFactoryLogging
{
  class Program
  {
    static void Main(string[] args)
    {
      //BitFactory provides many logger types out of the box. Check out the
      //Bitfactory assembly and the contained loggers. Plugging in a BitFactory
      //logger into SLF is as simple as submitting the logger to SLF's BitFactoryLogger, eg:
      //ILogger logger = new BitFactoryLogger(new BitFactory.Logging.EmailLogger());

      //create logger through convenience method
      ILogger logger = BitFactoryLogger.CreateSingleFileLogger("Log.txt");
     
      //assign logger to LoggerService
      LoggerService.SetLogger(logger);

      DoSomeWork();
      Console.ReadLine();
    }


    private static void DoSomeWork()
    {
      ILogger logger = LoggerService.GetLogger();
      logger.Info("Sample entry created {0}", DateTime.Now);
      Console.Write("Wrote log entry to log file 'Log.txt'");
    }
  }
}